Introduction
The primary focus of this article is to explain the automatic minimizing and restoring of views in Domino Designer to Domino Designer users.
Background
Now that Domino Designer has moved to Eclipse, Eclipse views have been introduced to present various kinds of information to the user. Views are the rectangles in the Designer layout that contain different pieces of the Designer UI to support different editing functions. Some views are very important when creating or editing XPages, for example, but have little benefit while editing classic Notes elements like Forms and Views. For that reason, while editing certain Design Element types some views will be minimized to give as much screen real estate to those Design Elements as possible.
Auto minimization and restoration of Eclipse views in Designer
When a user first opens Designer they will notice that the Properties, Events, Problems, Controls and Data (which won't be visible) views are all minimized, as shown
here in Example 1.
Example 1:
By default when viewing Notes elements, these views provide little or no useful information and are minimized to provide as much screen real estate as possible to the Notes element. In this case, the Home page.
These views will remain minimized for essentially all elements in an application with some important exceptions. First
ly, the Design Elements List for each element
type will have these views restored, as the Properties view will provide important information about the Design Elements. Example 2 shows an example of the Design
Elements List for "Forms".
Example 2:
Second
ly, the views are restored when editing XPages and Custom Controls, as they make extensive use of the Controls, Data, Properties and Events views.
Moving selection from a Notes element to an XPage and back again you will see these views get minimized and restored as described.
We expect most users will find this default configuration to work well for them, but we do allow users to customize their experience.
This is done through the Domino Designer Preferences Panel under File -> Preferences -> Domino Designer, shown here in Example 3:
Example 3:
Before we continue, it is important to understand the idea of state. State refers to which Eclipse views are minimized and which are restored
for a given element type. We distinguish between two states only. For the purpose of this article we will refer to these two states as Notes state and
Eclipse state, where Notes state refers to the state of the views for classic Notes Design Elements and Eclipse state refers to the state of the views
for every other Design Element ( XPages, Custom Controls, Design Lists, Stylesheets, JavaScript Libraries etc...).
Firstly in the Preferences Panel you will see the option "Minimize the Eclipse views selected below when I edit classic Notes Design Elements such as forms and views".
This essentially turns on and off all minimizing and restoring functionality and restores the views to Eclipse state. Example 4 shows how the views would be restored
if you were editing a Form when this option was deselected. Bear in mind that this is the Eclipse state that the views have been restored to, and the user can change the Eclipse
state, so the views may not be restored exactly as they are shown in Example 4. Example 4 shows how the views would be restored if the Eclipse state was that of
Example 2 above.
Eclipse state is the base state that is used in the product. This is because Eclipse defaults to having all the Domino Designer views set to restored (i.e. visible but not maximized).
That is how the views are needed for XPages, Custom Controls, Design Lists etc.. We programmatically minimize the views when needed to form Notes state. Hence when the user
turns off the minimizing functionality, the views switch to Eclipse state, and don't stay as they were for Notes Design elements.
Example 4:
With this option deselected, the state of the views will not change when switching between Notes state and Eclipse state. For example if you were to minimize the Properties and Outline
views in Example 4 above and then open an XPage, the Properties and Outline views would still be minimized for the XPage. If you were to then restore the Outline view and return
to the Form, the Outline view would remain restored and the Properties view would remain minimized.
But lets assume that the user has this option selected. Beneath that option in the Preferences Panel there is a list of views which can be selected, as per Example 5.
Example 5:
This allows the user to select which views are minimized while they are editing classic Notes elements. Example 5 shows the default configuration, where Controls,
Properties, Events, Problems and Data will all be minimized while editing Notes elements, giving the Notes state shown in Example 1. The Outline view is not
minimized by default because it does not really affect the screen real estate of Notes Elements, given that we do not give the option for users to minimize the
Applications Navigator.
The note "This will minimize the panel containing the view, along with any other views currently in that panel" is very important when changing these options.
As per Example 4 above, you can see that the Properties, Events and Problems views are all grouped together on a single panel (It's not technically a panel,
but for the purposes of this article we will refer to it as one), where it is impossible to minimize one without minimizing all three.
This note basically says, that if you have a single view on a panel selected to be minimized for Notes elements, all views on that panel will be minimized for
Notes elements regardless of whether or not they are selected in this list. So to restore the Properties view a user would have to deselect Properties, Problems and
Events.
Lets walk through a sample scenario to show how this all works in the real world. Starting with the default configuration discussed above and shown in Examples 1 and 2.
Scenario 1:
A user starts by creating a Form that will be used as a data source on an XPage. While they are editing that Form they are in Notes state where the Properties, Events, Problems,
Controls and Data views are all minimized. Shown in Example 6.
Example 6:
Once they are finished editing the Form, the user creates a Notes View to later be used on the XPage. While the user is editing the Notes View (shown in Example 7), they will still be in Notes state,
so all the same views should be minimized as in Example 6.
Example 7:
Once the user is finished editing their Notes View, they create an XPage to display this Notes View. This switches to Eclipse state, where the Controls, Data, Properties, Events and Problems
views are restored. As shown in Example 8.
Example 8:
Once the user has completed work on their XPage, they may need to create a new Form, or edit a pre-existing one. Opening a Form will switch to Notes state, and once again
minimize all the views selected in the "Domino Designer" Preferences Panel, as shown in Example 6 above.
This is the simplest scenario, and the one that will be encountered by most users. However, Eclipse views are configurable and can be moved, reordered, minimized, maximized,
restored, closed, etc.. So lets look at some more complicated scenarios where the user has configured their environment differently.
Scenario 2:
From scenario 1, above, lets say when the user was editing the XPage they decided that they did not need the Outline view and minimized it. So their environment looked like
Example 9.
Example 9:
When the user then switches to their new Form to edit it, all the views that are selected in the Preferences Panel are minimized. Giving what you see in Example 10.
Example 10:
You will notice that despite the fact that the Outline view is not selected to be minimized in the Preferences Panel, that it is still minimized while editing the Form. This is because,
the Eclipse state forms the base state, as previously discussed. Because the Outline view is minimized for the Eclipse state, it remains minimized for the Notes state.
There is however a secondary effect to this, shown in Scenario 3.
Scenario 3:
Again, as per Scenario 1, the user is creating a Form to be used as a data source on an XPage, with the default configuration selected in the Domino Designer Preferences Panel.
This time, however, the user decides they need the extra space for the Applications Navigator and manually minimize the Outline view. Which would look just like what you see in
Example 10. Minimizing the Outline view in Designer will not affect whether or not the Outline view is selected to be minimized in the Preferences Panel.
When the user opens a Notes View (or any other classic Notes element) all the views will stay as they were for the previous Notes Element. Designer does not alter the views when you
move between elements that use the same view state.
However, when the user then switches to their XPage, all the views will be restored, including the Outline view, just like in Example 8. This happens because the state of the views
for the Notes state do not effect the Eclipse state. In Eclipse state, the Outline view was still restored, and hence was restored when the user opened the XPage.
However, when the user then returns to edit another Notes element (Form, View etc..) the standard views will be minimized again, but the Outline will not.
When moving from Eclipse state to Notes state, Designer will see that Outline is not selected to be minimized in the Preferences Panel and so will not minimize it, leaving it as the
Eclipse state had it, which in this case is restored. So the user would again be looking at what you see in Example 7 above.
Basically what all this is saying, is that the state of the Outline view for Notes elements was not maintained when the user switched to Eclipse state and back to Notes state.
It is also possible however for Designer to treat Eclipse state and Notes state completely separately. This again is accomplished through the Domino Designer Preferences Panel.
You will see the State Saving Options group box, with the option to "Always save the last state of these Eclipse views".
Turning this feature on, results in Designer treating the view states for XPages and Notes elements as completely separate entities. Changing whether a view is minimized or restored
in Notes State will not affect Eclipse state and vice versa.
Scenario 4:
Using the same sample scenario as Scenario 3. A user has the default options selected to be minimized in the Preferences Panel, but this time also has "Always save the last state of
these Eclipse views" selected. Once again the user minimizes the Outline view giving an environment that looks like Example 10. As with Scenario 3, when the user switches to
edit their Notes View element, the Outline view stays minimized and when they switch to their XPage the Outline view is restored, as you would expect.
The major difference here is that when the user switches to edit another Notes element, the Outline view is once again minimized. So the users environment would look like Example 10 again.
This happens because with "Always save the last state of these Eclipse views" selected, Designer maintained the users preferences for the Outline view in Notes state and restored that when
the user returned to Notes state.
The Preferences Panel will also have been updated to reflect the users new preferences for Notes Elements. As you can see in Example 11 the Outline view has now been selected
to be minimized for Notes elements.
So basically all that this is saying is that the state of the views for Notes elements is now maintained when a user switches to Eclipse state and back to Notes state.
Example 11:
Note that the preference panel will not be updated immediately when a user minimizes or restores a view. It will only be updated with the users new preferences when they navigate away
from the Notes element they are editing at the time. So for example, when they close the editor, open a different Notes element for editing, switch to an XPage or Design List, shut down Designer etc...
This is due to Eclipse not easily providing events for us to hook to when views are minimized, restored, maximized, moved etc..
Recap
In brief, the available options are as follows.
- All Off. With the "Minimize the Eclipse views.... " option deselected, every view for every Design Element will have Eclipse state. The state of the various open views will not change when you switch between Design Elements.
- Standard. This is how Designer is initially configured. The "Minimize the Eclipse views.... " option is selected and the Controls, Properties, Events, Problems and Data views will be minimized for all Classic Notes Design Elements.
- Custom. With the "Minimize the Eclipse views.... " option selected, you can select which views will be minimized for all Classic Notes Design Elements.
- Standard/Custom with state saving on. With the "Minimize both the Eclipse views.... " and "Always save the last state... " options selected, the selected views will be minimized for all Classic Notes Design Elements, but if you restore
one or more of them, those views will be deselected in the preference panel (Likewise if you were to minimize any views that were not selected in the preferences panel, they would be selected in the preferences panel.) and their state
will be maintained when switching between Design Elements.
Summary
The auto minimizing and restoring of views is a feature that all users of Domino Designer will encounter, and one that should help to relieve the constant need to minimize and restore views
while working on complex applications that utilize XPages and Classic Notes Design Elements. Properly configured, it can be a useful tool in building complex applications.